package transportadora;

import java.sql.*;
import java.util.*;

public class Main {
    
    public static void main (String[] args) throws ClassNotFoundException, SQLException {
    
    Connection test = BDConnection.connectLH() ;
    
    Statement stmt = test.createStatement();
   // ResultSet set = stmt.executeQuery("Select num_contribuinte,id_morada,nome_cliente,bi,mail from clientes");

    HashSet<Client> clc = new HashSet();
/*
    while (set.next()) {
        int numc = set.getInt("num_contribuinte");
        int idmor = set.getInt("id_morada");
        String nome = set.getString("nome_cliente");
        int bi = set.getInt("bi");
        String mail = set.getString("mail");
        Client temp = new Client(numc,idmor,nome,bi,mail);
        clc.add(temp);
    }

    Iterator<Client> it = clc.iterator();
    Client c;

    while(it.hasNext()) {
         c = it.next();
         System.out.println(c.toString());
    }

 
 */
    
    Client c = new Client (132546,0001,"Joao Miguel",132546,"maildojoao@mail.pt");
    c.insertClientBD(test, c);



    
    stmt.close();
    
    }

}
